﻿namespace YawetagLib.Utilities
{
    public class EmailOptions
    {
        public EmailOptions(string smtpHost, int smtpPort, bool enableSsl,
            bool smtpNeedsAuthentication, string smtpAuthenticationUserName, string smtpAuthenticationPassword, 
            EmailModeEnum mode)
        {
            SmtpHost = smtpHost;
            SmtpPort = smtpPort;

            EnableSsl = enableSsl;
            SmtpNeedsAuthentication = smtpNeedsAuthentication;
            SmtpAuthenticationUserName = smtpAuthenticationUserName;
            SmtpAuthenticationPassword = smtpAuthenticationPassword;

            Mode = mode;
        }

        public EmailOptions(string smtpHost, int smtpPort, EmailModeEnum mode)
            : this(smtpHost, smtpPort, false, false, string.Empty, string.Empty, mode)
        {
        }

        public EmailOptions(string smtpHost, int smtpPort)
            : this(smtpHost, smtpPort, EmailModeEnum.On)
        {
        }

        public string SmtpHost { get; private set; }
        public int SmtpPort { get; private set; }

        public bool EnableSsl { get; private set; }
        public bool SmtpNeedsAuthentication { get; private set; }
        public string SmtpAuthenticationUserName { get; private set; }
        public string SmtpAuthenticationPassword { get; private set; }

        public EmailModeEnum Mode { get; private set; }
        public string DebugPipeAddress { get; set; }
    }

    public enum EmailModeEnum { On, Off, Debug }
}
